<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script src="../js/jquery-3.4.1.min.js"></script>

    <script>
        $(function () {

            let  url = location.href
            let  uid = url.split("?uid=")[1]

         $.ajax({

             //请求路径
             url:"/user/"+uid,


             //请求方式
             type:"get",

             dataType:"JSON",

             success:function (res) {
                 console.log(res)
                 $("#loginName").val(res.loginName)
                 $("#loginPwd").val(res.loginPwd)
             },

             error:function () {
                 alert("获取id失败 , 服务器异常")


             }






         })

        })


    </script>
</head>
<body>

<h1>修改</h1>

<form action="" id = "f01">
    <table  width="500px">

        <tr>
            <td>登录名</td>
            <td>
                <input type="text" name="loginName" id="loginName">
            </td>
        </tr>

        <tr>
            <td>密码</td>
            <td>
                <input type="text" name="loginPwd" id="loginPwd">
            </td>
        </tr>


        <tr>
            <td></td>
            <td>
                <input type="button"  onclick="sub()" value="确定">
            </td>
        </tr>


    </table>

</form>














</body>
</html>